The gradient wipe effect uses a matte image to create a transition between two source images. The transition from source 'A' to source 'B' will occur first where the matte image is darkest, last where the matte image is brightest..
During the effect, if the luminance value of the matte image at a given point is greater than the alpha threshold for the effect, the pixel from source 'A' is displayed. If the alpha threshold is higher than the matte image's luminance value at that point, the pixel from source 'B' is displayed. The alpha threshold increases as the effect progresses, eventually causing it to be higher than the luminance value of the matte image at all points, so that only the pixels from source 'B' are displayed.
The equation for the change in the alpha threshold as the effect progresses is:
The algorithm used to animate the transition is:
for (y=0; y<height; y++) {
for (x=0; x<width; x++) {
if (matte_image_luminiance(x,y) > alphaThreshold)
output pixel source_A(x,y)
else
output pixel source_B(x,y)
}
}
The example above uses a matte image of Shakespeare to control the transition from source 'A' to source 'B'.
The Gradient Wipe effect takes two sources and has two parameters.
For a description of how to set effects parameters, and of effect parameter atom structures, see Parameter Descriptions. For an illustration of tweened and untweened parameters, see Parameter Atoms of an Effects Description.
| Previous | Chapter contents | Chapter top | Section top | Next |